from flask import Flask
from flask_cors import CORS

from api.task_api import task_bp
from api.testcase_api import testcase_bp

app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
CORS(app)


@app.route('/')
def hello():
    return 'Hello, world!'


# 注册蓝图
app.register_blueprint(testcase_bp)
app.register_blueprint(task_bp)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, debug=True)
